home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / lisp / clue.lha / clue / clos-kludge / defsystem.l < prev    next >
Lisp/Scheme  |  1989-07-12  |  2KB  |  75 lines

  1. ;;; -*- Mode:Lisp; Package:USER; Syntax:COMMON-LISP; Base:10; Lowercase:T -*-
  2.  
  3. ;;;
  4. ;;;             TEXAS INSTRUMENTS INCORPORATED
  5. ;;;                  P.O. BOX 2909
  6. ;;;                   AUSTIN, TEXAS 78769
  7. ;;;
  8. ;;; Copyright (C) 1988 Texas Instruments Incorporated.
  9. ;;;
  10. ;;; Permission is granted to any individual or institution to use, copy, modify,
  11. ;;; and distribute this software, provided that this complete copyright and
  12. ;;; permission notice is maintained, intact, in all copies and supporting
  13. ;;; documentation.
  14. ;;;
  15. ;;; Texas Instruments Incorporated provides this software "as is" without
  16. ;;; express or implied warranty.
  17. ;;;
  18.  
  19. (in-package 'user)
  20.  
  21. (unless (find-package 'cluei)
  22.   (make-package 'cluei :use '(lisp xlib)))
  23.  
  24. (unless (find-package 'xlib)
  25.   #+explorer (IF (w:mouse-y-or-n-p "Package XLIB does not exist.  You must load CLX before continuing.
  26. Should I load CLX for you?")
  27.          (MAKE-SYSTEM 'clx :noconfirm)
  28.          (ERROR "Load CLX first"))
  29.   #-explorer (warn "WARNING: CLX must be loaded before CLOS-KLUDGE"))
  30.  
  31. (defun compile-clos-kludge (&optional (option :compile) directory)
  32.   ;; Load CLUE, optionally compiling changed files.
  33.   ;; If OPTION is :RECOMPILE, recompile all files
  34.   ;; If OPTION is :LOAD, don't compile anything, just load.
  35.   (declare (type (or string pathname) directory)
  36.        (type (or null (member :load :compile :recompile)) option)
  37.        (special *CLOS-KLUDGE-directory*))
  38.   (unless directory
  39.     (setq directory (if (boundp '*CLOS-KLUDGE-directory*)
  40.             *CLOS-KLUDGE-directory*
  41.               *default-pathname-defaults*)))
  42.   (setq *CLOS-KLUDGE-directory* directory)    ; Set defaults for the next time
  43.   (flet ((module (file &optional opt dir)
  44.        (compile-load (merge-pathnames file (or dir directory)) (or opt option))))
  45.  
  46.     (module "clos")
  47.     (module "standard")
  48.     (module "clos-patch")
  49.     ))
  50.  
  51. (defun load-clos-kludge (&optional directory)
  52.   (compile-clos-kludge :load directory))
  53.  
  54. #+explorer
  55. (defsystem clos-kludge
  56.   (:pathname-default "clue:clos-kludge;")
  57.  
  58.   (:module clos "clos")
  59.   (:module standard-class "standard")
  60.   (:module clos-patch "clos-patch")
  61.  
  62.   (:compile-load clos)
  63.   (:compile-load standard-class (:fasload clos))
  64.   (:compile-load clos-patch (:fasload clos standard-class))
  65.   )
  66.  
  67. #+symbolics
  68. (defsystem clos-kludge
  69.   (:default-pathname "clue:clos-kludge;"
  70.    :pretty-name "Clos Kludge"
  71.    :bug-reports ("clue-bugs@dsg.csc.ti.com" "Report problems with CLUE.")
  72.    )
  73.    (:serial "clos" "standard" "clos-patch"))
  74.  
  75.